﻿<?php

require_once 'control/masterController.php';
require_once 'control/headersController.php';

$masterController = new masterController();
$headersController = new headersController();
 
$body = "";

?>

<!DOCTYPE html>
<html dir="ltr" lang="en-US">
	<head>
		<!--[if lte IE 8]>
		<script src="html5.js" type="text/javascript"></script>
		<![endif]-->
		<meta charset="UTF-8" />
			<title>klaslundin.se</title>
			<link rel="stylesheet" type="text/css" href="styles/basic.css" title="default" />
			<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
			<link href='http://fonts.googleapis.com/css?family=Gloria+Hallelujah' rel='stylesheet' type='text/css'>
			<script src="http://code.jquery.com/jquery-latest.js"></script>
			<script src="scripts/validate.js"></script>
	</head>
	<body>
		<section>
			<header class="<?php echo $headersController->DoHeader();?>">
				
				<?php
				if ((date('m') == 12) && (date('d') == 24)) { 
					?><h2 class="Xmas">GOD JUL!</h2><?php } 
				?>
				
				<div id="facebbokImg">
					<a href="http://sv-se.facebook.com/klas.lundin" class="facebookImage"><img src="pics/facebook.png" alt="Klas Lundin" title="Klas" /></a>
				</div>
			</header>
			<nav>
				<?php
					//För att kolla vilken länk som är aktiv
					if (isset($_GET["a"]) == "about") {
						$aboutView = "aktiv";
					}
					elseif (isset($_GET["c"]) == "contact") {
						$contactView = "aktiv";
				
					} 
					elseif (isset($_GET["portfolio"]) == "portfolio") {
						$portfolioView = "aktiv";
					} 
					elseif (empty($_GET)) {
						$homeView = "aktiv";
					}
					else {
						$portfolioView = "aktiv";
					} 
				?>
				
				<ul>
					<li class="fade">
						<a href="index.php" class="<?php echo $homeView;?>" >Hem</a>
					</li>
					<li class="fade">
						<a href="?a=about" class="<?php echo $aboutView;?>" >Om mig</a>
					</li>
					<li class="fade">
						<a href="http://klaslundin.wordpress.com/" >Blogg</a>
					</li>
					<li class="fade">
						<a href="?portfolio=portfolio" class="<?php echo $portfolioView;?>" >Portfolio</a>
					</li>
					<li class="fade">
						<a href="?c=contact" class="<?php echo $contactView;?>" >Kontakt</a>
					</li>
				</ul>
				<!-- Search Google -->
				<div id="googlesearch">
					<form method="get" action="http://www.google.se/search">
						<input type="text" name="q" size="15" maxlength="255" value="" />
						<input type="hidden" name="hl" value="sv" />
						<input type="submit" name="btnG" value="Google" />
					</form>
				</div>
				<!-- Search Google -->
			</nav>
			
			<?php
				$body .=$masterController->DoActiveView();
			?>
			
			
			<div id="rightmenu">
				<aside>
					<h3>Herr Lundin</h3>
					<div id="klasbild">
						<a href="?a=about"><img src="pics/kl_2011-03-22.jpg" alt="Klas Lundin" title="Klas" /></a>
					</div>
					<p>
						Klas Lundin, född och uppvuxen i Kalmar.
					</p><br/>
					<p><br/>
					</p>
				</aside>
				<aside><br/><br/>
					<h3>Länkar</h3>
					<ul>
						<li>
							<a href="http://klaslundin.se/webshop">NYTT! WebShop</a>
						</li>
						
						<li>
							<a href="http://homepage.lnu.se/student/kl222bm">Portfolio/Skoljobb</a>
						</li>
						<li>
							<a href="http://homepage.lnu.se/student/kl222bm/javascript/memory/index.html">Spela Star Wars-memory</a>
						</li>
					</ul>
				</aside>
			</div>
			<footer>
				<p>
					<?php
					// set the default timezone to use. Available since PHP 5.1
					date_default_timezone_set('UTC');

					// Dagens datum
					echo date("Y-m-d");
					?>
				</p>
				<p>
					&copy; Klas Lundin 2010
				</p>
			</footer>
		</section>
		<script src="scripts/script.js"></script>
			<div class="position">
				<a href="http://www.w3.org/html/logo/">
					<img src="http://www.w3.org/html/logo/badge/html5-badge-v-css3-semantics.png" width="38" height="138" alt="HTML5 			Powered with CSS3 / Styling, and Semantics" title="HTML5 Powered with CSS3 / Styling, and Semantics">
				</a>
			</div>
	</body>
</html>
